package nc.hw;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;

public class HJ6 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();
        List<Integer> integers = splitNum(num);
        for (Integer integer : integers) {
            System.out.print(integer);
            System.out.print("\t");
        }
    }

    private static List<Integer> splitNum(int num) {
        List<Integer> nums = new ArrayList<>();
        for (int i = 2; i*i <= num; ) {
            if (num % i == 0) {
                // 被整除了，获取
                nums.add(i);
                num = num / i;
            } else {
                i ++;
            }
        }
        nums.add(num);
        return nums;
    }
}
